package com.hmall.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.common.vo.FilterParamVo;
import com.hmall.item.pojo.Item;
import org.apache.ibatis.annotations.Select;

import java.util.HashSet;
import java.util.List;

public interface ItemMapper extends BaseMapper<Item> {
    /**
     * 过滤项聚合
     *
     * @param filterParamVo
     * @return
     */
    List<Item> searchFilter(FilterParamVo filterParamVo);

    HashSet<String> searchBrand(FilterParamVo filterParamVo);

    HashSet<String> searchCategory(FilterParamVo filterParamVo);

    @Select("select * from tb_item order by sold desc limit 20")
    List<Item> searchListTop();
}
